//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

namespace Microsoft.Research.ScientificWorkflow.TridentUtilities
{
    #region using directives
    using System;
    using System.Text; 
    #endregion

    /// <summary>
    /// EventArgs overriden for passing the info specified by the user.
    /// </summary>
    public class InfoEnteredEventArgs : EventArgs
    {
        /// <summary>
        /// The name entered.
        /// </summary>
        private string infoEntered;

        /// <summary>
        /// The description entered.
        /// </summary>
        private string infoDescriptionEntered;
        // The full path of the category selected.
        private Guid selectedCategoryId;
        /// True if the event specifies that the user has cancelled name entry.
        /// </summary>
        private bool isCancel;

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="infoEntered">
        /// Information entered by the user.
        /// </param>
        /// <param name="isCancel">
        /// Specifies if the user cancelled the info entering process.
        /// </param>
        public InfoEnteredEventArgs(string infoEntered, bool isCancel)
        {
            this.infoEntered = infoEntered;
            this.isCancel = isCancel;
        }

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="infoEntered">
        /// Information entered by the user.
        /// </param>
        /// <param name="isCancel">
        /// Specifies if the user cancelled the info entering process.
        /// </param>
        public InfoEnteredEventArgs(string infoEntered,string infoDescription,Guid categoryId, bool isCancel)
        {
            this.infoEntered = infoEntered;
            this.infoDescriptionEntered = infoDescription; 
            this.selectedCategoryId = categoryId;
            this.isCancel = isCancel;
        }
        /// Gets the name of the workflow as entered.
        /// </summary>
        public string InfoEntered
        {
            get
            {
                return this.infoEntered;
            }
        }

        /// <summary>
        /// Gets the description of the workflow as entered.
        /// </summary>
        public string InfoDescriptionEntered
        {
            get
            {
                return this.infoDescriptionEntered;
            }
        }

        /// <summary>
        /// Gets the category of the workflow as entered.
        /// </summary>
        public Guid SelectedCategoryId
        {
            get
            {
                return this.selectedCategoryId;
            }
        }

        /// <summary>
        /// Gets if the user cancelled the event or not.
        /// </summary>
        public bool IsCancel
        {
            get
            {
                return this.isCancel;
            }
        }
    }
}
